<template>
  <div>
    <Top :data="data"></Top>
    <Middle :data="data"></Middle>
    <Footer></Footer>
  </div>
</template>
<script lang="ts" setup>
//引入首页的子组件-三个
import Top from "./Top/index.vue";
import Middle from "./Middle/index.vue";
import Footer from "./Footer/index.vue";

//引入请求函数
import { reqChartData } from "../../api/home/index";
import { onMounted,ref} from "vue";
let data = ref({});
onMounted(async () => {
  let result = await reqChartData();
   data.value = result
});
</script>

